export function throttle(func, wait = 1000) {
	var previous = 0;
	return function (this: any, ...args: any[]) {
		let now = Date.now();
		let context = this;
		if (now - previous > wait) {
			func.apply(context, args);
			previous = now;
		}
	}
}
